%@ Language=VBScript %> <%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %> <% Dim objPCTopUpCards Set objPCTopUpCards = CreateObject("PCWebAdmin.PCTopUpCards") If objPCTopUpCards.Error Then WriteErrorMessage objPCTopUpCards.ErrorDescription End If Function GetProcessCardError(intError) Dim s If intError = 0 Then ' No error s = "" ElseIf intError = 1 Then s = GetText("ErrorTUCExpired") ElseIf intError = 2 Then s = GetText("ErrorTUCUsed") ElseIf intError = 3 Then s = GetText("ErrorTUCInvalid") ElseIf intError = 4 Then s = GetText("ErrorUnexpectedError") End If GetProcessCardError = s End Function Dim strCardNo strCardNo = UCase(Trim(Request("txtCardNo"))) If Not gblnIsLoggedIn Then WriteErrorMessage GetText("ErrorUserNotLoggedIn") & " " & GetText("AnonAccessDisabled") Else ' Top up If strCardNo <> "" and Request("txtSubmitted") <> "" Then If objPCTopUpCards.ProcessCard(strCardNo, gstrLoggedInUser) Then RedirectWithMessage "default.asp", GetText("TopUpSuccess") Else WriteErrorMessage GetText("ErrorTUCUnableToProcess") & ". " & GetProcessCardError(objPCTopUpCards.ProcessErrorNo) & " " & GetText("ActionLogged") & ". " & objPCTopUpCards.ErrorDescription End If End If %>
<%=GetText("TopUpCardInstr")%>
<%=GetText("TopUpCardInstrNote")%>
<% End If Set objPCTopUpCards = Nothing %>